Slice 1 (2/4): repository interface + in-memory & SQLite adapters - #2
Merged
Conversation
tildesrc
force-pushed
the
slice1/02-persistence
branch
from
June 12, 2026 17:34
d6294a0 to
f627a51
Compare
tildesrc
force-pushed
the
slice1/02-persistence
branch
from
June 12, 2026 18:35
f627a51 to
72324c3
Compare
tildesrc
force-pushed
the
slice1/02-persistence
branch
from
June 12, 2026 19:02
72324c3 to
f4b127f
Compare
tildesrc
force-pushed
the
slice1/02-persistence
branch
from
June 12, 2026 19:07
f4b127f to
41d4b3a
Compare
tildesrc
force-pushed
the
slice1/02-persistence
branch
from
June 12, 2026 21:17
41d4b3a to
00a9d5b
Compare
tildesrc
force-pushed
the
slice1/02-persistence
branch
2 times, most recently
from
June 14, 2026 15:11
615c7be to
21fe057
Compare
tildesrc
force-pushed
the
slice1/01-core
branch
2 times, most recently
from
June 14, 2026 15:25
19a9eca to
58db21b
Compare
tildesrc
force-pushed
the
slice1/02-persistence
branch
2 times, most recently
from
June 14, 2026 16:05
f1fafbc to
61da990
Compare
tildesrc
force-pushed
the
slice1/02-persistence
branch
from
June 14, 2026 16:15
61da990 to
ffb1d50
Compare
tildesrc
force-pushed
the
slice1/01-core
branch
6 times, most recently
from
June 14, 2026 17:07
7b5b92b to
18cda68
Compare
tildesrc
force-pushed
the
slice1/02-persistence
branch
2 times, most recently
from
June 14, 2026 17:33
3865076 to
bde155e
Compare
tildesrc
force-pushed
the
slice1/02-persistence
branch
from
June 14, 2026 17:38
bde155e to
6af1447
Compare
tildesrc
force-pushed
the
slice1/02-persistence
branch
from
June 14, 2026 18:06
6af1447 to
5d20b9e
Compare
tildesrc
commented
Jun 14, 2026
tildesrc
force-pushed
the
slice1/02-persistence
branch
5 times, most recently
from
June 14, 2026 19:00
784870d to
03fe50e
Compare
tildesrc
commented
Jun 15, 2026
| ) | ||
|
|
||
|
|
||
| def _fulfil_current_promises(history_row: _HistoryRow, entry: HistoryEntry) -> None: |
Contributor
Author
There was a problem hiding this comment.
I think this should be a method on _HistoryRow
tildesrc
force-pushed
the
slice1/02-persistence
branch
from
June 15, 2026 00:24
03fe50e to
729e5b3
Compare
The persistence interface is `Store` (not `Repository`, which collided with the `Repo` domain object). A SQLAlchemy-backed `SqlAlchemyStore` replaces the hand-rolled sqlite3 and dict-based adapters; "in-memory" is just an in-memory SQLite engine (StaticPool), with on-disk SQLite as the other tested backend. - Translators, not ORM-bound core: the pure, frozen domain models stay untouched; the adapter's mutable row classes own to_domain/from_domain, and parent->child links are ORM relationships (selectin eager-load, cascade insert). - Integrity enforced by the Store base via template methods: create_task/save_task run validate_task_consistency / validate_history_append_only and delegate raw persistence to _insert_task / _stored_history / _update_task, so an adapter can't skip the checks. _update_task only appends new entries and fulfils the current entry's promises in place. - Reflective tests guard that rows and domain dataclasses can't drift. Schema via metadata.create_all; Alembic deferred (BACKLOG). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tildesrc
force-pushed
the
slice1/02-persistence
branch
from
June 15, 2026 00:33
729e5b3 to
61f03c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second of four stacked PRs for Slice 1. The persistence boundary.
panopticon.core.repository— theRepositoryABC (interface, ADR 0001/0006) + shared integrity checks (append-only, consistent history).InMemoryRepository+SqliteRepository(user_version migrations).Stacked on the core PR; base is
slice1/01-core.🤖 Generated with Claude Code